package com.songlanyun.modules.order.entity;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;

import java.io.Serializable;
import java.util.Date;

import com.songlanyun.common.drive.RootEntity;
import lombok.Data;

import javax.validation.constraints.NotNull;

/**
 * 订单与商家的key（如果商家在pc端删除订单，保证用户还可以看到）
 *
 * @author lubo
 * @email sunlightcs@gmail.com
 * @date 2020-11-16 14:14:43
 */
@Data
@TableName("yxt_sale_order_business_key")
public class OrderBusinessKey extends RootEntity<Long,OrderBusinessKey> implements Serializable {
	private static final long serialVersionUID = 1L;

	/**
	 *
	 */
	@TableId
	private Long id;
	/**
	 * 订单id
	 */
	@NotNull(message = "必须设置订单id")
	private Long orderId;
	/**
	 * 商家店铺Id
	 */
	@NotNull(message = "必须设置所属商家店铺Id")
	private Long shopId;
	/**
	 * 删除时间戳（用于软删除）
	 */
	@TableLogic
	private Integer deleted;

	@Override
	public Long getIdentity() {
		return getId();
	}
}
